@extends('admin.base')

@section('content')
    <div class="layui-card" style="margin-top: 20px; height: 390px;">
        <div class="layui-card-body">
            <div class="layui-form">
                {{csrf_field()}}
                {{method_field('put')}}
                <input type="hidden" name="id" value="{{$data['id']}}">
                <div class="layui-form-item">
                    <label class="layui-form-label">网站：</label>
                    <div class="layui-input-inline layui-width-300">
                        <select name="websiteId" id="websiteId">
                            @foreach($websiteData as $val)
                                <option @if($val['id'] == $data['website_id']) selected @endif value="{{$val['id']}}">{{$val['names']}}</option>
                            @endforeach
                        </select>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label for="" class="layui-form-label">名称</label>
                    <div class="layui-input-inline">
                        <input type="text" name="category_name" value="{{$data['category_name']}}" lay-verify="required" placeholder="" class="layui-input layui-width-300">
                    </div>
                </div>



                <div class="layui-form-item">
                    <div class="layui-input-block">
                        <button type="submit" class="layui-btn layui-btn-sm" lay-submit="" lay-filter="formSubmitData" wy-data="{url:'{{route('admin.category.update')}}'}" ><i class="fa fa-save"></i> 保存</button>
                        <a href="javascript:parent.layui.layer.closeAll();" class="layui-btn layui-btn-primary layui-btn-sm"><i class="fa fa-reply-all" aria-hidden="true"></i>  取消</a>
                    </div>
                </div>

            </div>
        </div>
    </div>
@endsection
